from django.contrib import admin
from .models import Article
# Register your models here.
class ArticleAdmin(admin.ModelAdmin):
    list_display=('title','content','pub_time')
    list_filter=('pub_time',)

# admin.site.register(Article,ArticleAdmin)

@admin.register(Article)
class PoemAdmin(admin.ModelAdmin):
    list_display = ('title', 'content', 'pub_time')
    list_filter = ('pub_time',)
    search_fields = ('title',)  # 添加快速查询栏
    class Media:
        js = (
            '/static/kindeditor/kindeditor-all.js',#这是在后台的页面中追加js文件
            '/static/kindeditor/lang/zh-CN.js',
            '/static/kindeditor/config.js',
        )


